package com.js;

import com.js.study.datastructs.version1.MyArray;

/**
 * @Author JiangSen
 * @DATE 2023/12/23 9:23
 */
public class ONe {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.addFirst(2);
        myArray.add(2,3);
        myArray.add(1, 4);
       // myArray.addLast(77);
        //myArray.addLast(999);
        myArray.print();

//        System.out.println("removeFirst: " + myArray.removeFirst());
//        System.out.println("removeLast: " + myArray.removeLast());
//        myArray.print();
//        myArray.print();
//        System.out.println("myArray.set: " + myArray.set(1, 1111));
//        myArray.print();
//
//        System.out.println("myArray.get(1): " + myArray.get(1));
//        System.out.println("myArray.contain(1111): " + myArray.contain(1111));
//        System.out.println("-----------------------------");
//        myArray.print();
//        System.out.println("-----------------------------");
//        myArray.printReverse();
//
//        System.out.println("-----为什么正向打印有两个999，反向打印无?，引出游离对象");
    }
}
